<!doctype html>
<html lang="zh-cn">
<head>

    <meta charset="utf-8">
    <meta name="generator" content="Hugo 0.57.2" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Manjaro使用笔记 | The Sky of OtsWang</title>
    <meta property="og:title" content="Manjaro使用笔记 - The Sky of OtsWang">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content="2019-06-16T22:07:04&#43;08:00">
        
        
    <meta property="article:modified_time" content="2019-12-25T00:00:00&#43;08:00">
        
    <meta name="Keywords" content="golang,go语言,otswang,java,博客,python">
    <meta name="description" content="Manjaro使用笔记">
        
    <meta name="author" content="OtsWang">
    <meta property="og:url" content="https://otswang.gitee.io/hugo/post/other/manjaro/">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

    <link rel="stylesheet" href="/hugo/css/normalize.css">
    
        <link rel="stylesheet" href="/hugo/css/prism.css">
    
    <link rel="stylesheet" href="/hugo/css/style.css">
    <script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>

    


    
    
</head>

<body>
<header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="https://otswang.gitee.io/hugo/">
                        The Sky of OtsWang
                    </a>
                
                <p class="description">擅长写HelloWorld的小小码农</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    
                    
                    <a  href="https://otswang.gitee.io/hugo/" title="Home">Home</a>
                    
                    <a  href="https://otswang.gitee.io/hugo/tags/" title="Tags">Tags</a>
                    
                    <a  href="https://otswang.gitee.io/hugo/categories/" title="Categories">Categories</a>
                    
                    <a  href="https://otswang.gitee.io/hugo/archives/" title="Archives">Archives</a>
                    
                    <a  href="https://otswang.gitee.io/hugo/about/" title="About">About</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>


<div id="body">
    <div class="container">
        <div class="col-group">

            <div class="col-8" id="main">
                <div class="res-cons">
                    <article class="post">
                        <header>
                            <h1 class="post-title">Manjaro使用笔记</h1>
                        </header>
                        <date class="post-meta meta-date">
                            2019年6月16日
                        </date>
                        
                        <div class="post-meta">
                            <span>|</span>
                            
                                <span class="meta-category"><a href="https://otswang.gitee.io/hugo/categories/other">Other</a></span>
                            
                        </div>
                        
                        
                        
                        <div class="post-content">
                            <p>Manjaro 从入门到第N次入门</p>

<h2 id="常用软件">常用软件</h2>

<ul>
<li>截图： Flameshot</li>
<li>indicator： indicator-keylock</li>
</ul>

<h2 id="fcitx安装">Fcitx安装</h2>

<pre><code class="language-conf"># .xprofile
#fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=&quot;@im=fcitx&quot;
</code></pre>

<p>rime 配置</p>

<pre><code class="language-conf"># default.custom.yaml
# save it to:
#   ~/.config/fcitx/rime  (linux)
#   ~/Library/Rime       (macos)
#   %APPDATA%\Rime       (windows)

patch:
  schema_list:
    - schema: luna_pinyin          # 朙月拼音
    - schema: luna_pinyin_simp     # 朙月拼音 简化字模式
    - schema: terra_pinyin         # 地球拼音 dì qiú pīn yīn
    - schema: bopomofo             # 注音
    - schema: jyutping             # 粵拼
    - schema: wubi86               # 五笔 86
    - schema: wubi_pinyin          # 五笔拼音混合輸入
    - schema: double_pinyin_flypy  # 小鶴雙拼

</code></pre>

<h2 id="字体">字体</h2>

<pre><code>wqy-microhei
fc-cache -fv
wqy-microhei-lite
wqy-bitmapfont
wqy-zenhei
source-code-pro
</code></pre>

<h2 id="rust-安装">rust 安装</h2>

<p>首先安装rustup</p>

<p>然后使用清华的源</p>

<p>使用rustup来安装rust相关</p>

<pre><code class="language-bash">$ pacman -S rustup
$ RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install stable # for stable
$ echo 'export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup' &gt;&gt; ~/.zsh_profile
</code></pre>

<p>crate.io 配置国内源</p>

<p>如果 cargo 版本为 0.13.0 或以上, 需要更改 $HOME/.cargo/config 为以下内容:</p>

<pre><code class="language-conf">[source.crates-io]
registry = &quot;https://github.com/rust-lang/crates.io-index&quot;
replace-with = 'ustc'
[source.ustc]
registry = &quot;git://mirrors.ustc.edu.cn/crates.io-index&quot;
</code></pre>

<h2 id="aur修改">aur修改</h2>

<p>yay 用户</p>

<p>执行以下命令修改 aururl :  <code>yay --aururl &quot;https://aur.tuna.tsinghua.edu.cn&quot; --save</code></p>

<p>修改的配置文件位于 <code>~/.config/yay/config.json</code>，还可通过以下命令查看修改过的配置  <code>yay -P -g</code></p>

<h2 id="截图">截图</h2>

<p>xfce4-screenshooter -fd 1</p>

<h2 id="mysql">mysql</h2>

<p>安装mariadb</p>

<pre><code class="language-bash">mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
</code></pre>

<p>安装后提示：</p>

<p>Installing MariaDB/MySQL system tables in &lsquo;/var/lib/mysql&rsquo; &hellip;
OK</p>

<p>To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system</p>

<p>Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system &lsquo;root&rsquo; user to connect. Use, for example, sudo mysql
The second is mysql@localhost, it has no password either, but
you need to be the system &lsquo;mysql&rsquo; user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo</p>

<p>You can start the MariaDB daemon with:
cd &lsquo;/usr&rsquo; ; /usr/bin/mysqld_safe &ndash;datadir=&lsquo;/var/lib/mysql&rsquo;</p>

<p>You can test the MariaDB daemon with mysql-test-run.pl
cd &lsquo;/usr/mysql-test&rsquo; ; perl mysql-test-run.pl</p>

<pre><code class="language-sql">CREATE USER 'test'@'localhost' IDENTIFIED BY 'xxx';
CREATE USER 'test'@'%' IDENTIFIED BY 'xxx';
GRANT ALL  ON *.* TO 'test'@'localhost';
GRANT ALL PRIVILEGES ON test.* TO 'test'@'%';
FLUSH PRIVILEGES;
quit;
</code></pre>

<p>MySQL 默认禁用客户端自动补全功能。要在整个系统中启用它，编辑 /etc/mysql/my.cnf，将 no-auto-rehash 替换为 auto-rehash。下次客户端启动时就会启用自动补全。</p>

<h2 id="npm">npm</h2>

<p>安装cnpm</p>

<pre><code class="language-bash">$ npm install -g cnpm --registry=https://registry.npm.taobao.org
</code></pre>

<h2 id="切换root">切换root</h2>

<pre><code class="language-bash">mount -t jfs /dev/sda7 /mnt

mount -t ext3 /dev/sda8 /mnt/boot

mount -t proc /proc /mnt/proc

mount -t sysfs sys /mnt/sys

mount -o bind /dev /mnt/dev
</code></pre>

<h2 id="java">java</h2>

<pre><code class="language-bash">java -Djava.ext.dirs= /some/home -jar xxx.jar
</code></pre>

<h2 id="xfce4">xfce4</h2>

<p>【窗口管理器】 【主题】 Matcha-Sea</p>

<p>【外观】    【样式】 Matcha-Sea</p>

<pre><code>                【图标】 Papirus-Maia
</code></pre>

<h2 id="zsh">zsh</h2>

<p>配置</p>

<pre><code class="language-bash">$ chsh -s /bin/zsh    # change the default of current user
$ sudo chsh -s /bin/zsh # change the default of su
</code></pre>

<pre><code>ZSH_THEME=&quot;robbyrussell&quot;
</code></pre>
                        </div>

                        


                        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/hugo/post/other/linux/">Linux学习</a></li>
        
    </ul>
</div>


                        <div class="post-meta meta-tags">
                            
                            <ul class="clearfix">
                                
                                <li><a href="https://otswang.gitee.io/hugo/tags/linux">Linux</a></li>
                                
                                <li><a href="https://otswang.gitee.io/hugo/tags/manjaro">Manjaro</a></li>
                                
                            </ul>
                            
                        </div>
                    </article>
                    
    

    
    
                </div>
            </div>
            <div id="secondary">

    <section class="widget">
        <form id="search" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="https://otswang.gitee.io/hugo/">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>

    
    <div class="clear">
        <div class="toc-article">
            <div class="toc-title">文章目录</dixsv>
            <nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#常用软件">常用软件</a></li>
<li><a href="#fcitx安装">Fcitx安装</a></li>
<li><a href="#字体">字体</a></li>
<li><a href="#rust-安装">rust 安装</a></li>
<li><a href="#aur修改">aur修改</a></li>
<li><a href="#截图">截图</a></li>
<li><a href="#mysql">mysql</a></li>
<li><a href="#npm">npm</a></li>
<li><a href="#切换root">切换root</a></li>
<li><a href="#java">java</a></li>
<li><a href="#xfce4">xfce4</a></li>
<li><a href="#zsh">zsh</a></li>
</ul></li>
</ul>
</nav>
        </div>
    </div>
    

</div>
        </div>
    </div>
</div>
<footer id="footer">
    <div class="container">
        &copy; 2020 <a href="https://otswang.gitee.io/hugo/">The Sky of OtsWang By OtsWang</a>.
        Powered by <a rel="nofollow noreferer noopener" href="https://gohugo.io" target="_blank">Hugo</a>.
        <a href="https://www.flysnow.org/" target="_blank">Theme</a> based on <a href="https://github.com/Dudiao137/maupassant-hugo" target="_blank">maupassant-ots</a>.
        
    </div>
</footer>


    <script type="text/javascript">
    
    (function(){
        $("pre code").parent().addClass("line-numbers")
    }())

    window.MathJax = {
        tex2jax: {
            inlineMath: [ ['$','$'] ],
            processEscapes: true
        }
    };
    </script>
    <script type="text/javascript" src="/hugo/js/prism.js" async="true"></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src="/hugo/js/totop.js?v=0.0.0" async=""></script>







 
 <script src="https://mermaidjs.github.io/scripts/mermaid.min.js"></script>
 <script>
       mermaid.initialize({ startOnLoad: true });
 </script>
</body>
</html>
